<?php
/**
 * SMS Class
 *
 */
class SMS extends MyObject {

	protected $text;
	protected $from;
	
	public function __construct() {
		
		parent::__construct();
		
	}
	
	public function getData() {
	
		if(!empty($_GET['from']) && !empty($_GET['content'])) {
	
			// save parameters from the Orange receiveSMS method
			$this->from = $_GET['from'];
			$this->text = strtolower(substr(strstr($_GET['content']," "), 1)); // remove the keyword from the text message
			
			return true;		
		}
		else
			return false;
	}
}
?>
